<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="../../common/header.jsp"/>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<html>
<head>
<script type="text/javascript">
//返回到企业用户列表
function backcompanyUserlist() {
	$("#companyuserRoleform").attr("action","<%=request.getContextPath()%>/sso/company_user/list");
	$("#companyuserRoleform").submit();
}

</script>

</head>
<body class="page-header-fixed page-full-width">
		<div class="page-content">

			<div class="container-fluid">
				<div class="row-fluid">

					<div class="span12">


						<h3 class="page-title">

							<!--系统用户管理 <small>欢迎您，admin!</small> -->

						</h3>

						<ul class="breadcrumb">

							<li><i class="icon-home"></i> <a href="index.html">Home</a>

								<i class="icon-angle-right"></i></li>

							<li><a href="#">单点登录系统</a> <i class="icon-angle-right"></i>

							</li>

							<li><a href="#">企业用户</a></li>

						</ul>



					</div>

				</div>

				<div class="portlet-body form">

					<c:if test="${success}">
						<div class="alert alert-success">
							<button class="close" data-dismiss="alert"></button>
							<strong><spring:message code="success"></spring:message>!</strong>
							<spring:message code="save success"></spring:message>
							！
						</div>
					</c:if>

					<h3 class="page-title">
						<spring:message code="set the role"></spring:message> - ${username }
					</h3>
				
					<form action="comRoleSave"
						method="post" class="form-horizontal" id="companyuserRoleform">
						<input type="hidden" name="sorting_column_order" id="sorting_column_order" value="${sorting_column_order }"/>
						<input type="hidden" name="sorting_asc_desc"  id="sorting_asc_desc" value="${sorting_asc_desc}"/>
						<input type="hidden" name="searchValue"  value="${searchValue}"/>
						<input type="hidden" name="id" value="${id}"></input>
						<input type="hidden" name="iDisplayStart" value="${iDisplayStart}" />

						<table class="table table-striped table-bordered table-hover"
							id="user_role_grid">
							<thead>
								<tr>
									<th><spring:message code="role name"></spring:message></th>
									<th><spring:message code="role description"></spring:message></th>
									<th><spring:message code="checked"></spring:message></th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${comRolelist}" var="item" varStatus="status">
									<tr class="odd gradeX">
										<td width="200">${item.roleName }</td>
										<td>${item.sremark }</td>
										<td width="50"><input type="checkbox" name="role_ids"
											value="${item.oauthCompanyRoleId }" class="group-checkable"
											<c:if test="${item.nocheck=='0' }">checked="checked"</c:if> />
										</td>
									</tr>
								</c:forEach>
							</tbody>

						</table>

						<div class="form-actions">
							<button type="submit" id="ok" class="btn blue">
								<spring:message code="btn.common.save"></spring:message>
							</button>
							<button type="button" onclick="backcompanyUserlist();"
								class="btn">
								<spring:message code="btn.common.back"></spring:message>
							</button>

						</div>

					</form>

				</div>
		
			</div>
		</div>



</body>
</html>